SRC=$(wildcard *.c)
OBJ=$(SRC:.c=.o)
BIN=progress_bar

$(BIN):$(OBJ)
	@gcc -o $@ $^
	@echo "linking $^ to $@"
%.o:%.c
	@gcc -c $< -o $@  -g
	@echo "compile $<"

.PHONY:clean
clean:
	@rm -f $(BIN) $(OBJ)

